#gcc -fpic -export-dynamic -O1 -Bsymbolic-functions -c goog_authuser.c  -I/usr/include/python2.5/
#gcc -lpthread -ldl -lutil -lm -lpython2.5 -L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 -I/usr/include/python2.5/ goog_authuser.c
# gcc -lpthread -ldl -lutil -lm -lpython2.5 -L/usr/lib/python2.5/config -lpthread -ldl -lutil -lm -lpython2.5 -I/usr/include/python2.5/ goog_authuser.c


root: goog_pam.so goog_access 

goog_pam.so: goog_pam.o goog_authuser.o
	ld -lcrypto -x --shared -lpthread -ldl -lutil -lm -lpython2.5 -L/usr/lib/python2.5/config -o pam_goog.so goog_pam.o goog_authuser.o 

goog_pam.o:
	gcc -fPIC -c goog_pam.c -o goog_pam.o

goog_authuser.o:
	gcc -fPIC -c goog_authuser.c -I/usr/include/python2.5/ -o goog_authuser.o

goog_access: goog_access.c

clean:
	rm ./*.o ./*.so goog_access

#install needs to be run as root
install:
	./install.sh
